﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Paypayes.Aelda.Core
{
    public class Actor : Performer
    {
        public ControlState CurrentControlState;

        protected ControlState defaultControlState;

        public Queue<EventArgs> EventQueue;

        public Actor(UInt64 id): base(id)
        {
        }

        public override void PerformAction(ActionState action)
        {
            CurrentControlState.PerformAction(action);
        }

        public void RequestAction()
        {
            CurrentControlState.RequestAction();
        }

        public void ProcessEventQueue()
        {
            throw new NotImplementedException();
        }

        public override void ReceiveEvent(EventArgs e)
        {
            EventQueue.Enqueue(e);
        }

        public override Boolean Store()
        {
            throw new NotImplementedException();
        }

        public override Boolean Restore()
        {
            //throw new NotImplementedException();
            return true;
        }


        public void ResetControlState()
        {
            CurrentControlState = defaultControlState;
        }
    }
}
